/**
 * Created by kaki on 2017/10/30.
 */
import http from 'src/utils/http'
import { host } from 'src/config'

// 获取课程列表
export const getSchedulesList = (date, page = 1, include = 'schedules_course') => {
  const url = host + `user/schedules-courses`
  const data = {
    date,
    page,
    include
  }
  return http.get(url, data)
}

export const getOnceSchedules = (id, include = 'coach') => {
  const url = host + `user/schedules-courses/${id}`
  const data = {
    include
  }
  return http.get(url, data)
}

export const schedulesBooking = (data) => {
  const url = host + `user/schedules-booking`
  return http.post(url, data)
}

export const schedulesDetail = (id, include = 'course') => {
  const url = host + `user/schedules-courses/${id}`
  const data = {
    include
  }
  return http.get(url, data)
}
